package org.web2024.dao;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {                         //结果返回标准类
    private String code;
    private String msg;
    private Object data;

    public static Result success(Object data){
        return new Result("200","success",data);
    }
    public static Result success(){
        return new Result("200","success",null);
    }
    public static Result fail(String msg){
        return new Result("400",msg,null);
    }
}
